<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>position</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
    </style>
</head>
<body>
    <div style="position: relative;">
        <div style="width: 50px; height: 50px; background: red;"></div>
        <div style="width: 50px; height: 50px; background: green; position:absolute; left: 50%; top: 0; transform: translate(-50%);"></div>
        <div style="width: 50px; height: 50px; background: orange; position: absolute; right: 0; top: 0"></div>
    </div>
</body>
</html>